(function(){

	/*
	 * This is used as a scene for testing shape and LibreGE.utils.cubicBezier function.
	 */
	LibreGE.node.ShapeTestScene2D = function(){		
		
		var rect = new LibreGE.node.Shape2D([
			['rect', 10, 10, 50, 50]
		]);
		rect.fill = true;
		rect.fillColor = 'blue';
		
		var path = [
		    ['rect', 0, 0, 100, 100]
		];
		for(var t = 0.0; t <= 1.0; t += 0.01){
			var x = LibreGE.utils.cubicBezier(0, .5, .7, 1, t);
			var y = LibreGE.utils.cubicBezier(0, 1.5, -1.4, 1, t);
			x = t;
			path.push(['lineTo', x * 100, 100 - y * 100]);
		}
		if(t > 1.0){
			var x = LibreGE.utils.cubicBezier(0, .5, .7, 1, 1);
			x = t;
			var y = LibreGE.utils.cubicBezier(0, 1.5, -1.4, 1, 1);
			path.push(['lineTo',x * 100, 100 - y * 100]);			
		}
		
		
		var bezier = new LibreGE.node.Shape2D(path, {
			transforms : [
				{translate : {x:100,y:100}}
			]
		});
		
		
		var node = new LibreGE.node.Scene2D();
		node.showAxis(true);
		node.children.push(bezier);
		node.children.push(rect);
		
		return node;
	};
})();
